<!DOCTYPE html>
<html>
<head>
<title>拉钩教育</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1 code="test">xxx公司</h1>
<h2 code="lsy">用户:刘诗元</h1>
<button type="button" action="click">点击</button>
<button type="button" action="job_collect">收藏</button>
<button type="button" action="cv_send">投简历</button>
<button type="button" action="cv_upload">上传简历</button>
</body>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    alert($(this).text());
	log($(this).attr("action"));
  });
});

function log(code) {
	$.ajax({
             type: "POST",
             url: "http://192.168.17.140/kafka/log",
             data: {user_id:$("h2").attr("code"), act_time:new Date().getTime(), action:code, job_code:$("h1").attr("code")},
             dataType: "json",
             success: function(data){}
           });              
                
}
</script>
</html>
